package com.oreilly.ez.repo;

import com.oreilly.ez.entity.SysUser;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;
//import org.springframework.data.rest.core.annotation.RestResource;


@RepositoryRestResource

public interface SysUserRepo extends JpaRepository<SysUser,Integer> {

    @RestResource(path = "by-pin", rel = "by-pin")
    SysUser findByPin(@Param("pin") String pin);
}
